import 'package:flutter/material.dart';
import 'package:ost_flutter_module/common/adapt.dart';
import 'package:ost_flutter_module/common/color.dart';
import 'package:ost_flutter_module/common/styles.dart';
import 'package:ost_flutter_module/help/ost_route.dart';
import 'package:ost_flutter_module/widget/custom_widget/custome_radius_container.dart';

class DynamicCellUserInfo extends StatelessWidget {
  final ValueChanged<String> onTap;

  const DynamicCellUserInfo({Key key, this.onTap}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return GContainer(
      child: Padding(
        padding: EdgeInsets.all(Adapt.px(10)),
        child: Row(
          mainAxisAlignment: MainAxisAlignment.spaceBetween,
          children: [
            Icon(Icons.location_on_rounded, color: colorFACD33),
            SizedBox(width: Adapt.px(10)),
            Expanded(
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: [
                  Row(
                    children: [
                      Text('姓名', style: TextStyles.titleStyle),
                      SizedBox(width: Adapt.px(8)),
                      Text('18888888888', style: TextStyles.titleStyle),
                    ],
                  ),
                  SizedBox(height: Adapt.px(8)),
                  Text(
                    '广东省深圳市福田区莲花路新世界文博中心3302室',
                    style: TextStyles.detailTitleStyle,
                    maxLines: 2,
                  ),
                ],
              ),
            ),
            Icon(Icons.navigate_next_rounded, color: color999999),
          ],
        ),
      ),
      onTap: () {
        Navigator.pushNamed(context, GRouter.address_page);
      },
    );
  }
}
